#include <iostream>
using namespace std;

int myGetCount(int n)
{
    if (n == 0)
        return 1;
    int count = 0;
    while (n != 0)
    {
        n /= 10;
        count++;
    }

    return count;
}

int main()
{
    int n;
    cout << "请输入一个正整数: ";
    cin >> n;
    cout << "它的位数是：" << myGetCount(n) << endl;
    return 0;
}